package com.qijian.production.domain.query;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;
import java.util.Set;
import lombok.ToString;
import com.baomidou.mybatisplus.annotation.TableName;


/**
 * 生产计划单对象 查询条件类
 *
 * @author zhangcheng
 * @date 2025-03-25
 */

@Data
@ToString
@TableName("sc_work_order")
public class ScWorkOrderQuery {

    @WhereType(filed = "id")
    private Long id;
    @WhereType(filed = "process_id", tableName = "sc_work_order_detail")
    private Long fmProcessId;
    @WhereType(filed = "sort", tableName = "sc_work_order_detail")
    private Integer sort;
    @WhereType(filed = "id", type = WhereTypeEnum.IN)
    private Set<Long> ids;
    @WhereType(filed = "order_no", type = WhereTypeEnum.LIKE)
    private String orderNo;

    @WhereType(filed = "user_id", tableName = "production_detail", type = WhereTypeEnum.EQ)
    private Long userId;

    @WhereType(filed = "factory_code", type = WhereTypeEnum.LIKE)
    private String factoryCode;
    @WhereType(filed = "plan_start_date",type = WhereTypeEnum.BETWEEN)
    private Date[] planStartDate;
    @WhereType(filed = "plan_end_date",type = WhereTypeEnum.BETWEEN)
    private Date[] planEndDate;
    @WhereType(filed = "actual_start_date",type = WhereTypeEnum.BETWEEN)
    private Date[] actualStartDate;
    @WhereType(filed = "actual_end_date",type = WhereTypeEnum.BETWEEN)
    private Date[] actualEndDate;
    @WhereType(filed = "qty")
    private BigDecimal qty;
    @WhereType(filed = "deliver_date",type = WhereTypeEnum.BETWEEN)
    private Date[] deliverDate;
    @WhereType(filed = "status")
    private String status;
    @WhereType(filed = "order_craft_id")
    private Long orderCraftId;
    @WhereType(filed = "parent_id")
    private Long parentId;
    @WhereType(filed = "product_type")
    private String productType;
    @WhereType(filed = "source_id")
    private Long sourceId;
    @WhereType(filed = "factory_area")
    private String factoryArea;
    @WhereType(filed = "feed_no")
    private String feedNo;
    @WhereType(filed = "circulation_no")
    private String circulationNo;
    @WhereType(filed = "circulation_status")
    private String circulationStatus;
    @WhereType(filed = "circulation_date",type = WhereTypeEnum.BETWEEN)
    private Date[] circulationDate;
    @WhereType(filed = "is_contain")
    private Boolean isContain;
    @WhereType(filed = "feed_status")
    private String feedStatus;
    @WhereType(filed = "feed_by")
    private String feedBy;
    @WhereType(filed = "customer_id")
    private Long customerId;
    @WhereType(filed = "customer_name")
    private String customerName;
    @WhereType(filed = "delivery_date",type = WhereTypeEnum.BETWEEN)
    private Date[] deliveryDate;
    @WhereType(filed = "dept_name")
    private String deptName;
    @WhereType(filed = "number")
    private String number;
    @WhereType(filed = "prepared_by")
    private String preparedBy;
    @WhereType(filed = "old_qty")
    private BigDecimal oldQty;
    @WhereType(filed = "order_time",type = WhereTypeEnum.BETWEEN)
    private Date[] orderTime;
    @WhereType(filed = "line_id")
    private Long lineId;
    @WhereType(filed = "ancestors")
    private String ancestors;
    @WhereType(filed = "top_order_id")
    private Long topOrderId;
    @WhereType(filed = "item_id")
    private Long itemId;
    @WhereType(tableName = "main_item", filed = "item_code", type = WhereTypeEnum.LIKE)
    private String itemCode;
    @WhereType(tableName = "main_item", filed = "item_name", type = WhereTypeEnum.LIKE)
    private String itemName;
    @WhereType(tableName = "main_item", filed = "item_type", type = WhereTypeEnum.LIKE)
    private String itemType;
    @WhereType(filed = "is_process")
    private Boolean isProcess;
    @WhereType(filed = "examine_status")
    private Boolean examineStatus;
    @WhereType(filed = "is_dispatch")
    private Boolean isDispatch;
    @WhereType(filed = "workshop")
    private String workshop;
    @WhereType(filed = "is_picking")
    private Boolean isPicking;
    @WhereType(filed = "is_close")
    private Boolean isClose;
    @WhereType(filed = "contract_no")
    private String contractNo;
    @WhereType(filed = "sales_order_id")
    private Long salesOrderId;
    @WhereType(filed = "sales_order_item_id")
    private Long salesOrderItemId;
    @WhereType(filed = "cust_name")
    private String custName;
    @WhereType(filed = "cust_id")
    private Long custId;
    @WhereType(filed = "batch_no")
    private String batchNo;
    @WhereType(filed = "proportion")
    private BigDecimal proportion;
    @WhereType(filed = "cost_obj")
    private String costObj;
    @WhereType(filed = "fid")
    private Long fid;
    @WhereType(filed = "f_status")
    private String fStatus;
    @WhereType(filed = "bom_id")
    private Long bomId;
    @WhereType(filed = "main_bom_detail_id")
    private Long mainBomDetailId;
    @WhereType(filed = "detail_code")
    private String detailCode;
    @WhereType(filed = "remark")
    private String remark;
    /**
     * 查询类型：1.订单，2.订单详情
     */
    @WhereType(ignore = true)
    private String searchType;

    @WhereType(tableName = "sc_work_order_detail", filed = "process_name", type = WhereTypeEnum.LIKE)
    private String processName;


}
